package C;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class C29 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nums = Arrays.stream(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        int row = nums[0],col = nums[1];
        int targetRow = sc.nextInt(),targetCol = sc.nextInt();
        int target = targetRow*col+targetCol+1;
        int sum = 0;
        int preSum = 0;
        for (int i=3;i<nums.length;i+=2) {
            preSum = sum;
            sum += nums[i];
            System.out.println("sum="+sum+" preSum="+preSum);
            if (target>preSum && target<=sum) {
                System.out.println(nums[i-1]);
                break;
            }
        }
    }
}
